package exception;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * @program: javase
 * @description:
 * @author: luolidong
 * @create: 2021-07-05 11:41
 * @version: 1.0
 */
public class Service {
    public String play(){
        Map<Character,String> map=new HashMap<>();
        map.put('2', "abc");
        map.put('3', "def");
        map.put('4', "ghi");
        map.put('5', "jkl");
        map.put('6', "mno");
        map.put('7', "pqrs");
        map.put('8', "tuv");
        map.put('9', "wxyz");
        if(!map.isEmpty()){
//            throw new Exception("throw new RuntimeException");
        }
        int[] a=new int[]{1,2};
        try {
            int i=a[5];
            return i+"";
        }catch (Exception e){
            throw new IndexOutOfBoundsException("数组下标越界");
//            return "bb";
//            throw
        }finally {
            return "aa";
        }
//        String s = map.get('3');
//        System.out.println(s);


    }
}
